<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .person>li:not(.pass) {
            color: red
        }
        .student>li:not([sex^='fe']) {
            color: orange;
        }
    </style>
</head>
<body>
    <h1>否定伪类 not</h1>
    <h2>通过类否定</h2>
    <ul class="person">
        <li>张三</li>
        <li>李四</li>
        <li class="pass">王五</li>
        <li>赵六</li>
    </ul>
    <h2>通过属性选择器否定</h2>
    <ul class="student">
        <li sex="female">小红</li>
        <li sex="male">小明</li>
        <li sex="male">小强</li>
        <li sex="female">小丽</li>
    </ul>
</body>
</html>